package com.opennetexam.manager.controller;

import com.opennetexam.manager.dto.ExamAdminInfoDTO;
import com.opennetexam.manager.utils.GsonUtil;
import com.opennetexam.manager.utils.RedisUtil;

/**
 * @Description TODO
 * @Author 奶茶
 * Created by on 2018/9/5 14:01.
 */
public class BaseController {

    /**
     * 获取用户信息
     * @param account
     * @return
     */
    public ExamAdminInfoDTO getAdminUserInfo(String account){
       return GsonUtil.fromJsonToObject(RedisUtil.getValue(account),ExamAdminInfoDTO.class);
    }


    /**
     * 注销
     * @param account
     */
    public void logOut(String account){
        RedisUtil.delete(account);
    }

}
